home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7131 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.halcyon.com!usenet
  2. From: laurenv@halcyon.com (Lauren Vanderhoof)
  3. Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++,comp.lang.basic.visual.misc
  4. Subject: Re: Prob calling VC++ 4.0 DLL from VB4 (32bit)
  5. Date: Wed, 21 Feb 1996 04:01:33 GMT
  6. Organization: Northwest Nexus Inc.
  7. Message-ID: <4ge5da$ovs@news.halcyon.com>
  8. References: <4f7u8h$63q@fountain.mindlink.net> <3129a180.11614278@nntp.ix.netcom.com>
  9. NNTP-Posting-Host: blv-pm14-ip7.halcyon.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. billbo@ix.netcom.com (Bill Boland) wrote:
  13.  
  14. >a09748@giant.mindlink.bc.ca (ESSA) wrote:
  15.  
  16. >>
  17. >>Having a frustrating time trying to call a function in a DLL developed in
  18. >>VC++ 4.0 from Visual Basic 4.0 (32bit). I'm getting VB error 49 (bad DLL
  19. >>calling convention) from the following simple function ...
  20. >>
  21. <snip> non-working code
  22.  
  23. >Bill Boland
  24. >--------
  25. >billbo@ix.netcom.com
  26. >I may have a clue since I had a similar situation today.
  27. >If a DLL is compiled with VB 4.0 WITHOUT a module definition file and
  28. >uses  the new __declspec( dllexport ) to declare functions as
  29. >exportable, VB4 cannot seem to understand them. At least that is what
  30. >I discovered today on my own.
  31.  
  32. Yes a module definition file seems to be necessary, VB couldn't find
  33. the C function names until I included one.
  34.  
  35. However, this doesn't quite explain the "Bad Calling Convention"
  36. error.
  37.  
  38. Check out VB4DLL.TXT in the \VB directory on the CDROM. It should help
  39. explain all.
  40.  
  41. Cheers,
  42.     lauren :}
  43.  
  44.